package gew.data;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

public class IndicatorTableItem {
    private final static int COUNTRY = 1;
    private final int countryId;
    private String countryName;
    private final ArrayList<String> details;

    public IndicatorTableItem(ResultSet rs, int colCount) throws SQLException {
        this.countryId = rs.getInt(COUNTRY);
        details = new ArrayList<>();
        for (int i = COUNTRY + 1; i < colCount + 1; i++){
            details.add(rs.getString(i));
        }
    }

    public int getCountryId() {
        return countryId;
    }

    public Iterable<String> getDetails() {
        return details;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }
    
}
